package test2;

public class Book {
	public int func(int year, int month, int day) {
		int m2 = 0;
		if ((year % 4 == 0 && year % 100 != 0 )|| year % 400 == 0) {
			m2 = 28;
		} else {
			m2 = 29;
		}
		for (int i = 1; i < month; i++) {
			switch (i) {
			case 2:
				day = day + m2;
			case 4:
			case 6:
			case 9:
			case 11:
				day = day + 30;
				break;
			default:
				day = day + 31;
			}
		}
		return day;
	}
}
